package com.lldpet.spring.cloud.demo.stream.demo.controller;

import com.lldpet.spring.cloud.demo.stream.demo.service.MessageProvider;
import com.lldpet.spring.cloud.demo.stream.demo.service.impl.BpsMessageProviderImpl;
import com.lldpet.spring.cloud.demo.stream.demo.service.impl.MessageProviderImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @desc：MessageController
 * @author: guanliang.xue
 * @date: 2021/5/11 16:57
 * @version:
 * @since:
 */
@RestController
@RequestMapping("message")
public class MessageController {

    @Resource
    private MessageProviderImpl messageProvider;

    @Resource
    private BpsMessageProviderImpl bpsMessageProvider;

    @GetMapping("send")
    public String send(){
        return messageProvider.send();
    }

    @GetMapping("send/bps")
    public String sendByBps(){
        return bpsMessageProvider.send();
    }
}
